package cn.ct.interceptor;
/**
 * @author ct.team
 * @Description
 * Version 1.0
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author ct.team
 * @Description 拦截器配置类
 * Version 1.0
 */
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {

    @Autowired
    private SysInterceptor sysInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // 登录验证拦截器
        registry.addInterceptor(sysInterceptor).addPathPatterns("/api/**");
    }
}